#ifndef SHAPE_H
#define SHAPE_H

#include "Entity.h"

class ENGINE_API Shape : public Entity
{
public:
   Shape(const std::string& name) : Entity(name), m_color(0xffffffff){}

   virtual void draw(Renderer* renderer)
   { 
      Entity::draw(renderer);
      for ( int i = 0; i < m_vertexCount; ++i )
      {
         m_pVertices[i].color = m_color;
      }

      renderer->unbindTexture();
   }

   //void setColor(DWORD color) { m_color = color; }
   void setColor(short red = 0, short green = 0, short blue = 0, short alpha = 255) 
   {
      m_color = D3DCOLOR_RGBA(red, green, blue, alpha);
   }

   DWORD getColor() { return m_color; }

protected:
   ColorVertex* m_pVertices;
   int m_vertexCount;

   DWORD m_color;

};

#endif//SHAPE_H